<?php
/**
 * Created by DreamPHP.
 * User: Leruge
 * Date: 2018/4/10 0010
 * Time: 03:11
 * Email: leruge@163.com
 * Url: http://www.dreamphp.com.cn/
 */

namespace app\common\validate;

use think\Validate;

class VideoList extends Validate
{
    protected $rule = [
        'title|视频标题' => 'require|unique:video_list',
        'video_id|所属视频' => 'require',
        'url|视频地址' => 'require|url'
    ];

    public function sceneAdd()
    {
        return $this->only(['title', 'video_id', 'url']);
    }

    public function sceneEdit()
    {
        return $this->only(['title', 'video_id', 'url']);
    }
}